package com.yonyou.distribute.controller;

import com.yonyou.distribute.service.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class MysqlController {

    @Resource
    private MysqlService mysqlService;

    @Resource
    private MysqlService_1 mysqlService_1;

    @Resource
    private MysqlService_2 mysqlService_2;

    @Resource
    private MysqlService_3 mysqlService_3;


    @Resource
    private MysqlService_6 mysqlService_6;

    @GetMapping("/mysql/stock/deduct")
    public String deduct(){
        this.mysqlService.deduct();
        return "hello stock deduct";
    }

    @GetMapping("/mysql/prototype/stock/deduct")
    public String deduct_prototype(){
        this.mysqlService_1.deduct();
        return "hello stock deduct";
    }

    @GetMapping("/mysql/trans/stock/deduct")
    public String deduct_trans(){
        this.mysqlService_2.deduct();
        return "hello stock deduct";
    }

    @GetMapping("/mysql/cluster/stock/deduct")
    public String deduct_cluster(){
        this.mysqlService_3.deduct();
        return "hello stock deduct";
    }

    @GetMapping("/mysql/opt/stock/deduct")
    public String deduct_opt(){
        this.mysqlService_6.deduct();
        return "hello stock deduct";
    }
}
